
{% extends "layout.html" %}
{% block title %}Hello world!{% endblock %}
{% block body %}
    {{ super() }}
    <h2>二级模板</h2>
    <h1>Hello {{ name | capitalize if name else 'World' }}!</h1>

    {% if name %}
        <h1>Hello {{ name | capitalize }}!</h1>
    {% else %}
        <h1>Hello World!</h1>
    {% endif %}
    <a href="{{ url_for('auth.logout') }}">Logout</a>

    {% for digit in (1, 2, "yang") %}
        <h3>{{ digit }}</h3>
    {% endfor %}

    {% with messages = get_flashed_messages() %}
        {% if messages %}
            <ul class="flash">
                {% for message in messages %}
                    <li>{{ message }}</li>
                {% endfor %}
            </ul>
        {% endif %}
    {% endwith %}
{% endblock %}
